package com.common.sdk.net.download;

import com.common.sdk.net.download.interfaces.IDownloadBuilder;

import android.content.Context;

/**
 * 外部调用模块
 * @author wenlonglv
 *
 */
public class DownloadManagerEx {

    private static IDownloadBuilder downloadRequest;

    /**
     * 初始化调用
     * @param mContext
     * @return
     */
    public static void init(Context mContext) {
        DownloadManger.init(mContext);
    }

    /**
     * 后续调用
     * @return
     */
    public static IDownloadBuilder getInstance() {
        if (downloadRequest == null) {
            downloadRequest = DownloadManger.newDownloadingDispatcher();
        }
        return downloadRequest;
    }
}
